<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>评论编辑</title>
<link rel="stylesheet" type="text/css" href="/admin/style.css">
</head>
<body>

<div style="padding: 5px; text-align: left;">
	<#if parentComment??>
		<span style="float: right;">
			回复给: ${parentComment.authorName!'匿名'}
		</span>
	</#if>
	<h2>
		评论: ${post.title}
	</h2>
</div>
<div class="forms">
	<form id="commentForm" name="commentForm" method="post" action="/admin/comment?oper=save" onsubmit="checkComment()">
		<input type="hidden" name="id" value="${id}">
		<input type="hidden" name="postId" value="${post.id}">
		<input type="hidden" name="parentId" value="${parentId}">
		
		<#assign cnt="">
		<#if comment??>
			<#assign cnt="${comment.content}">
		<#elseif parentComment??>
			<#assign cnt="<blockquote>${parentComment.content}</blockquote><br>">
		</#if>
		<textarea name="content" rows="1" cols="1" class="box" style="width: 650px; height: 350px;">${cnt}</textarea>
		<p>
			<input type="submit" class="com_btn" value="保存">
		</p>
	</form>
</div>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="/static/lib/ke/kindeditor-min.js"></script>
<script type="text/javascript" src="/static/lib/ke/lang/zh_CN.js"></script>

<link rel="stylesheet" type="text/css" href="/static/lib/qtip/jquery.qtip.min.css">
<script type="text/javascript" src="/static/lib/qtip/jquery.qtip.min.js"></script>

<#-- 由于KE定义插件不是太方便, 用ftl方式来做稍微好点 -->
<#include "/static/js/ke-quote.ftl">

<script type="text/javascript">
	var contentEditor;
	KindEditor.ready(function(K) {
		contentEditor = K.create('textarea[name="content"]', {
			cssPath: "/static/css/ke-miniblog4j.css",
			resizeType: 0,
			items: ['bold', 'italic', 'underline', 'strikethrough', 'removeformat', '|',
				'quote', 'insertorderedlist', 'insertunorderedlist','|', 
				'forecolor', 'hilitecolor', 'fontname', 'fontsize',  '|', 
				'link', 'unlink', 'emoticons', 'code', 'image', 'flash', '|', 
				'selectall', 'source', 'about']
		});
	});
	
	function checkComment() {
		//alert(123);
		return true;
	}
</script>
</body></html>